/*
* @file my_wifi.h
* @brief Header file for the MyWifi class
* @author feiniao
* @version 1.0
* @date 2025-5-11
*/


#ifndef MY_WIFI_H
#define MY_WIFI_H

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "nvs_flash.h"
#include "nvs.h"


#include "freertos/event_groups.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_log.h"
#include "esp_sntp.h"

#define TAG "MyWifi"

#define DEFAULT_WIFI_SSID           "zyq"
#define DEFAULT_WIFI_PASSWORD       "88888888"

class MyWifi {
private:
    esp_err_t wifi_sta_init();
    void initialize_sntp();
    void disconnect_wifi();
public:
    MyWifi();
    ~MyWifi();
    void connect_wifi();
};


#endif